﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="role_menu.aspx.cs" Inherits="TCMSystem.admin.role_menu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        .x-grid-tpl .others input
        {
            vertical-align: middle;
        }
        .x-grid-tpl .others label
        {
            margin-left: 5px;
            margin-right: 15px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server" />
    <ext:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
        <Regions>
            <ext:Region ID="Region1" ShowBorder="false" ShowHeader="false" Split="true" EnableSplitTip="true"
                CollapseMode="Mini" Margins="0 0 0 0" Width="200px" Position="Left" Layout="Fit"
                BodyPadding="5px 0 5px 5px" EnableBackgroundColor="true" runat="server">
                <Items>
                    <ext:Grid ID="Grid1" runat="server" ShowBorder="true" ShowHeader="false" EnableCheckBoxSelect="false"
                        EnableRowNumber="true" DataKeyNames="Id" AllowSorting="true" OnSort="Grid1_Sort"
                        SortColumnIndex="0" SortDirection="DESC" AllowPaging="false" EnableMultiSelect="false"
                        EnableRowClick="true" OnRowClick="Grid1_RowClick">
                        <Columns>
                            <ext:BoundField DataField="Name" SortField="Name" ExpandUnusedSpace="true" HeaderText="角色名称" />
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Region>
            <ext:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center"
                Layout="Fit" BodyPadding="5px 5px 5px 0" EnableBackgroundColor="true" runat="server">
                <Items>
                    <ext:Grid ID="Grid2" runat="server" ShowBorder="true" ShowHeader="false" EnableCheckBoxSelect="false"
                        EnableRowNumber="true" DataKeyNames="Id">
                        <Toolbars>
                            <ext:Toolbar ID="Toolbar1" Position="Top" runat="server">
                                <Items>
                                    <ext:Button ID="Button1" EnablePostBack="false" runat="server" Text="改变复选框的状态">
                                        <Menu ID="Menu1" runat="server">
                                            <ext:MenuButton ID="btnSelectCheckbox" EnablePostBack="true" OnClick="btnSelectCheckbox_Click"
                                                runat="server" Text="全选复选框">
                                            </ext:MenuButton>
                                            <ext:MenuButton ID="btnUnSelectCheckbox" EnablePostBack="true" OnClick="btnUnSelectCheckbox_Click"
                                                runat="server" Text="反选复选框">
                                            </ext:MenuButton>
                                        </Menu>
                                    </ext:Button>
                                    <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                                    </ext:ToolbarSeparator>
                                    <ext:Button runat="server" ID="btnGroupUpdate" Icon="GroupEdit" Text="更新当前角色的显示菜单"
                                        OnClick="btnGroupUpdate_Click">
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </Toolbars>
                        <Columns>
                            <ext:BoundField DataField="Title" HeaderText="菜单名称" DataSimulateTreeLevelField="TreeLevel"
                                Width="150px" />
                            <ext:CheckBoxField ColumnID="showField" TextAlign="Center" DataField="IsShow" HeaderText="是否显示"
                                RenderAsStaticField="false" Width="80px" />
                            <ext:TemplateField HeaderText="模块名称" Width="120px">
                                <ItemTemplate>
                                    <%# GetModuleName(Eval("Name")) %>
                                </ItemTemplate>
                            </ext:TemplateField>
                            <ext:BoundField DataField="NavigateUrl" HeaderText="链接" Width="200px" />
                            <ext:BoundField DataField="Remark" HeaderText="备注" ExpandUnusedSpace="true" />
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Region>
        </Regions>
    </ext:RegionPanel>
    </form>
</body>
</html>
